package net.oschina.git.fsppp.view.model;

import net.oschina.git.fsppp.manager.DirManager;
import net.oschina.git.fsppp.manager.IDirManager;
import net.oschina.git.fsppp.model.P3Dir;
import net.oschina.git.fsppp.model.SimpleResponse;
import net.oschina.git.fsppp.view.contract.PropertyContract;
import rx.Observable;

import java.util.List;

/**
 * Created by QiHuang on 2016/10/21.
 */
public class PropertyModel implements PropertyContract.Model {
    private IDirManager dirManager = DirManager.getInstance();

    @Override
    public Observable<SimpleResponse<List<P3Dir>>> getChildDirs(P3Dir dir) {
        SimpleResponse<List<P3Dir>> response = dirManager.listDir(dir);
        return Observable.just(response);
    }
}
